//
// Created by 31853 on 2024/6/13.
//

#ifndef UPRE_TASK__FLOW_H
#define UPRE_TASK__FLOW_H

#include <stdbool.h>
#include "UPRE_GLOBAL_DEFINE.h"

typedef struct _task_flag {
    bool Flag_first_GetSeding;
    bool Flag_second_GetSeding;
    bool Flag_third_GetSeding;

    bool Flag_first_PutSeding_L;
    bool Flag_first_PutSeding_R;
    bool Flag_second_PutSeding_L;
    bool Flag_second_PutSeding_R;
    bool Flag_third_PutSeding_L;
    bool Flag_third_PutSeding_R;

    bool Flag_GetFrontBall;
    bool Flag_GetRearBall;

    bool Flag_ShootBall;
    bool Flag_ResetShootBallSpeed;
    bool Flag_AddShootBallSpeed;
    bool Flag_SubtractShootBallSpeed;

    bool Flag_Left90;
    bool Flag_Right90;

    bool Flag_Start;
    bool Flag_StartParking;
    bool Flag_OnceParking;
    bool Flag_StopParking;

    bool Flag_GetBallColcor;

    bool Flag_ManualMode;
    bool Flag_ExchangeManualMode;

    bool Flag_ExchangePath;

    bool Flag_ITPath;
    bool Flag_StartITPath;

    bool Flag_PathContinue;

    bool Flag_GoTO0;
    bool Flag_GoTO1;
    bool Flag_GoTO2;
    bool Flag_GoTO3;
    bool Flag_GoTO4;
    bool Flag_GoTO5;

    bool Flag_RedZone;
    bool Flag_BlueZone;

    bool Flag_ReStart;

    bool Flag_GoTwoZone;

    bool Flag_ManualGetSeding;

    bool Flag_UseManualYaw;
}Task_flag;

typedef struct HandShake {
    vector HandShake_Vec;
    Pose Handshake_Yaw;
    bool flag_getSeeding;
    bool flag_C;
    bool flag_D;
    bool flag_E;
    bool flag_F;
    bool flag_Left;
    bool flag_Right;
    bool Dir2Zero;
    bool Yaw2Zero;
}Handshake;

extern uint8_t Current_PathNum;

extern Task_flag TaskFlag;

extern Handshake hand_shake;

void TaskExecution(void);

#endif //UPRE_TASK__FLOW_H
